﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.EShop.Common.Entity;
using Runda.EShop.Bll;

namespace Runda.EShop.Web.Customer
{
    public partial class ProductRegister : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            SysProductRegisterEntity entity = new SysProductRegisterEntity();
            entity.ProductName = txtProductName.Text;
            entity.Standard = txtStandard.Text;
            entity.Brand = txtBrand.Text;
            entity.CreatedAt = DateTime.Now;
            entity.CustomerID = base.User.Identity.LoginUser.UserID;
            entity.CustomerName = base.User.Identity.LoginUser.EntName+"-"+base.User.Identity.LoginUser.UserName;
            //entity.Quantity = txtQuantity.Value.Value;
            entity.Deleted = false;

            OrderBll bll = new OrderBll();
            bll.Insert(entity);

            ClientScript.RegisterStartupScript(this.GetType(), "success", "alert('保存成功.');parent.$.ligerDialog.hide();", true);
        }
    }
}